-
Notifications
You must be signed in to change notification settings - Fork 119
fix: prevent npe caused by missing parentheses #1198
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1198 +/- ##
=========================================
Coverage ? 79.18%
Complexity ? 1199
=========================================
Files ? 205
Lines ? 5270
Branches ? 436
=========================================
Hits ? 4173
Misses ? 924
Partials ? 173
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. This could use an issue and a test.
@elharo Hey, thank you for your feedback! I can create an issue for this PR in a bit. For the tests: Unfortunately I don't understand what is going on in this class (and what it is for) so it would cost me several hours to set up a working test case for it (AFAICT there aren't any tests for this class yet). I think that would not be worth it. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Fixes" without tests are too risky. If you don't have the time to write a test, please file an issue and close this PR. We'll triage and get to it when we can.
b1390bc
to
af11f2d
Compare
Created an issue and a basic minimal test case for my fix. PTAL |
🤖 I have created a release \*beep\* \*boop\* --- ## [1.60.0](https://www.github.com/googleapis/gax-java/compare/v1.59.1...v1.60.0) (2020-10-19) ### Features * REST Gapic (REGAPIC) Support ([#1177](https://www.github.com/googleapis/gax-java/issues/1177)) ([12b18ee](https://www.github.com/googleapis/gax-java/commit/12b18ee255d3fabe13bb3969df40753b29f830d5)) ### Bug Fixes * prevent npe caused by missing parentheses ([#1198](https://www.github.com/googleapis/gax-java/issues/1198)) ([b856351](https://www.github.com/googleapis/gax-java/commit/b85635123f987f9808086f14a58dd8c7418a3bd8)) ### Dependencies * upgrade grpc to 1.32.2 ([#1212](https://www.github.com/googleapis/gax-java/issues/1212)) ([03c4c0f](https://www.github.com/googleapis/gax-java/commit/03c4c0f621f439c30752122568d2a9a7703e5e16)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Currently I can't set the log level lower than
FINER
because this library throws a NPE. The cause of this problem is a missing pair of parentheses.This is the current snippet:
Which is equivalent to:
This results in calling
callable.getClass().getEnclosingMethod().getName()
even ifcallable.getClass().getEnclosingMethod()
isnull
.Fixes #1198.